package com.zygh.policeasset.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zygh.policeasset.mapper.RoadCrossMapper;
import com.zygh.policeasset.pojo.RoadCross;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/service/RoadCrossService.class */
public class RoadCrossService {
    @Autowired
    RoadCrossMapper roadCrossMapper;

    public PageInfo findByName(Integer pageNum, Integer pageSize, String name) {
        PageHelper.startPage(pageNum.intValue(), pageSize.intValue());
        return new PageInfo(this.roadCrossMapper.findByNameLike(name));
    }

    public List<RoadCross> findByNameNoPage(String name) {
        return this.roadCrossMapper.findByNameLike(name);
    }

    public Integer update(RoadCross roadCross) {
        return this.roadCrossMapper.update(roadCross);
    }

    public Integer add(RoadCross roadCross) {
        return this.roadCrossMapper.add(roadCross);
    }

    public Integer delete(Integer id) {
        return this.roadCrossMapper.delete(id);
    }
}